﻿using System;
using System.Collections.Generic;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000272 RID: 626
	public class TAliasClause : TParseTreeNode
	{
		// Token: 0x0600138D RID: 5005 RVA: 0x00323F30 File Offset: 0x00322130
		public void setAsToken(TSourceToken st)
		{
			this._token_as = st;
		}

		// Token: 0x0600138E RID: 5006 RVA: 0x00323F3C File Offset: 0x0032213C
		public virtual bool searchColumn(TObjectName pColumn)
		{
			bool result = false;
			if (this._columns == null)
			{
				return false;
			}
			for (int i = 0; i < this._columns.size(); i++)
			{
				if (this._columns.getObjectName(i).ToString().Equals(pColumn.ColumnNameOnly, StringComparison.CurrentCultureIgnoreCase))
				{
					result = true;
					break;
				}
			}
			return result;
		}

		// Token: 0x17000358 RID: 856
		// (get) Token: 0x0600138F RID: 5007 RVA: 0x00323F8F File Offset: 0x0032218F
		// (set) Token: 0x06001390 RID: 5008 RVA: 0x00323F97 File Offset: 0x00322197
		public virtual bool SybaseIndexHint
		{
			get
			{
				return this._isSybaseIndexHint;
			}
			set
			{
				this._isSybaseIndexHint = value;
			}
		}

		// Token: 0x17000359 RID: 857
		// (get) Token: 0x06001392 RID: 5010 RVA: 0x00323FA9 File Offset: 0x003221A9
		// (set) Token: 0x06001391 RID: 5009 RVA: 0x00323FA0 File Offset: 0x003221A0
		public virtual List<TTableHint> TableHints
		{
			get
			{
				return this._tableHints;
			}
			set
			{
				this._tableHints = value;
			}
		}

		// Token: 0x1700035A RID: 858
		// (get) Token: 0x06001394 RID: 5012 RVA: 0x00323FBA File Offset: 0x003221BA
		// (set) Token: 0x06001393 RID: 5011 RVA: 0x00323FB1 File Offset: 0x003221B1
		public virtual bool TeradataNamedAlais
		{
			get
			{
				return this._teradataNamedAlais;
			}
			set
			{
				this._teradataNamedAlais = value;
			}
		}

		// Token: 0x1700035B RID: 859
		// (get) Token: 0x06001395 RID: 5013 RVA: 0x00323FC2 File Offset: 0x003221C2
		// (set) Token: 0x06001396 RID: 5014 RVA: 0x00323FCA File Offset: 0x003221CA
		public virtual TObjectNameList Columns
		{
			get
			{
				return this._columns;
			}
			set
			{
				this._columns = value;
			}
		}

		// Token: 0x1700035C RID: 860
		// (get) Token: 0x06001398 RID: 5016 RVA: 0x00323FDC File Offset: 0x003221DC
		// (set) Token: 0x06001397 RID: 5015 RVA: 0x00323FD3 File Offset: 0x003221D3
		public virtual TSourceToken AsToken
		{
			get
			{
				return this._token_as;
			}
			set
			{
				this._token_as = value;
			}
		}

		// Token: 0x1700035D RID: 861
		// (get) Token: 0x0600139A RID: 5018 RVA: 0x00323FED File Offset: 0x003221ED
		// (set) Token: 0x06001399 RID: 5017 RVA: 0x00323FE4 File Offset: 0x003221E4
		public virtual bool HasAs
		{
			get
			{
				return this._hasAs || this._token_as != null;
			}
			set
			{
				this._hasAs = value;
			}
		}

		// Token: 0x1700035E RID: 862
		// (get) Token: 0x0600139C RID: 5020 RVA: 0x0032400B File Offset: 0x0032220B
		// (set) Token: 0x0600139B RID: 5019 RVA: 0x00324002 File Offset: 0x00322202
		public virtual TObjectName AliasName
		{
			get
			{
				return this._aliasName;
			}
			set
			{
				this._aliasName = value;
			}
		}

		// Token: 0x1700035F RID: 863
		// (get) Token: 0x0600139D RID: 5021 RVA: 0x00324013 File Offset: 0x00322213
		// (set) Token: 0x0600139E RID: 5022 RVA: 0x0032401B File Offset: 0x0032221B
		public virtual TColumnDefinitionList ColumnNameTypeList
		{
			get
			{
				return this._columnNameTypeList;
			}
			set
			{
				this._columnNameTypeList = value;
			}
		}

		// Token: 0x0600139F RID: 5023 RVA: 0x00324024 File Offset: 0x00322224
		public override void init(object arg1, object arg2, object arg3)
		{
			this.init(arg1, arg2);
			this._columnNameTypeList = (TColumnDefinitionList)arg3;
		}

		// Token: 0x060013A0 RID: 5024 RVA: 0x0032403A File Offset: 0x0032223A
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			this._columns = (TObjectNameList)arg2;
		}

		// Token: 0x060013A1 RID: 5025 RVA: 0x00324050 File Offset: 0x00322250
		public override void init(object arg1)
		{
			if (arg1 is TObjectName)
			{
				this._aliasName = (TObjectName)arg1;
			}
			else if (arg1 is TConstant)
			{
				this._aliasName = new TObjectName();
				this._aliasName.init(null, ((TConstant)arg1).getvalueToken());
			}
			else if (arg1 is TSourceToken)
			{
				this._aliasName = new TObjectName();
				this._aliasName.init(null, (TSourceToken)arg1);
			}
			if (this._aliasName != null)
			{
				this._aliasName.ObjectType = 4;
			}
		}

		// Token: 0x060013A2 RID: 5026 RVA: 0x003240D8 File Offset: 0x003222D8
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060013A3 RID: 5027 RVA: 0x003240E8 File Offset: 0x003222E8
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001685 RID: 5765
		private bool _isSybaseIndexHint;

		// Token: 0x04001686 RID: 5766
		private List<TTableHint> _tableHints;

		// Token: 0x04001687 RID: 5767
		private bool _teradataNamedAlais;

		// Token: 0x04001688 RID: 5768
		private TObjectName _aliasName;

		// Token: 0x04001689 RID: 5769
		private TObjectNameList _columns;

		// Token: 0x0400168A RID: 5770
		private TSourceToken _token_as;

		// Token: 0x0400168B RID: 5771
		private bool _hasAs;

		// Token: 0x0400168C RID: 5772
		private TColumnDefinitionList _columnNameTypeList;
	}
}
